package org.esgl3d.scene;

import java.util.logging.Level;
import java.util.logging.Logger;

public class LightNode extends SceneNode {
	
	private static final Logger logger = Logger.getLogger(LightNode.class.getName());
	
	@Override
	protected void onSceneSwitch(Scene from, Scene to) {
		if (from != null) {
			if (logger.isLoggable(Level.FINE))
				logger.fine("Removing light from scene");
			from.unregisterLightNode(this);
		}
		
		if (to != null) {
			if (logger.isLoggable(Level.FINE))
				logger.fine("Adding light to scene");
			to.registerLightNode(this);
		}
	}
}
